<%@ page import="com.itheima.bean.Student" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>EL表达式获取不同类型数据</title>
</head>
<body>
     <%
      Student stu = new Student("张三",23,87);
      pageContext.setAttribute("stu",stu);%>
     获取自定义对象${ stu} <br>
     姓名:${stu.username} <br>
     年龄:${stu.age} <br>
    <% ArrayList<Student> list = new ArrayList<>();
    Student  sd = new Student("李四",26,98);
    Student  sd1 = new Student("妞妞",22,78);
    list.add(sd);
    list.add(sd1);
    pageContext.setAttribute("list", list);
    %>
    ${ list} <br>
   ${list[0]}<br>
   ${list[1]}<br>
</body>
</html>
